package com.tdtxdcxm.ruralcommunity.slice;

import com.tdtxdcxm.ruralcommunity.ResourceTable;
import com.tdtxdcxm.ruralcommunity.appruntime.DataCenterControl;
import com.tdtxdcxm.ruralcommunity.myutils.MyTools;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.agp.components.Button;
import ohos.agp.components.Component;
import ohos.agp.components.Text;

public class DtAndWzDetails extends AbilitySlice {
    private String contentid= "";
    private String userid = "";

    private Button dt_wz_detail_topddl_nobut,dt_wz_detail_authorbut,dt_wz_detail_topddl_discussbut,dt_wz_detail_topddl_agreebut,dt_wz_detail_topddl_collectbut;
    private Text dt_wz_detail_authortext,dt_wz_detail_fieldtext,dt_wz_detail_contenttext;


    private void initDtWzDtASComponents(String listContainerName,int i){
        dt_wz_detail_topddl_nobut = (Button) findComponentById(ResourceTable.Id_dt_wz_detail_topddl_nobut);
        dt_wz_detail_authorbut = (Button) findComponentById(ResourceTable.Id_dt_wz_detail_authorbut);
        dt_wz_detail_topddl_discussbut = (Button) findComponentById(ResourceTable.Id_dt_wz_detail_topddl_discussbut);
        dt_wz_detail_topddl_agreebut = (Button) findComponentById(ResourceTable.Id_dt_wz_detail_topddl_agreebut);
        dt_wz_detail_topddl_collectbut = (Button) findComponentById(ResourceTable.Id_dt_wz_detail_topddl_collectbut);

        dt_wz_detail_authortext = (Text) findComponentById(ResourceTable.Id_dt_wz_detail_authortext);
        dt_wz_detail_fieldtext = (Text) findComponentById(ResourceTable.Id_dt_wz_detail_fieldtext);
        dt_wz_detail_contenttext = (Text) findComponentById(ResourceTable.Id_dt_wz_detail_contenttext);

        switch (listContainerName) {
            case "worlddtlc":
                //不能自己关注自己，不能自己点赞、评论、收藏自己
                if(DataCenterControl.userName.equals(DataCenterControl.worlddt_listcontainer_list.get(i).getUser_id())){
                    dt_wz_detail_authorbut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_discussbut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_agreebut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_collectbut.setVisibility(Component.HIDE);
                }
                else {
                    dt_wz_detail_authorbut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_discussbut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_agreebut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_collectbut.setVisibility(Component.VISIBLE);
                }
                dt_wz_detail_authortext.setText(DataCenterControl.worlddt_listcontainer_list.get(i).getUser_id());
                dt_wz_detail_fieldtext.setText(DataCenterControl.worlddt_listcontainer_list.get(i).getField_id());
                dt_wz_detail_contenttext.setText(DataCenterControl.worlddt_listcontainer_list.get(i).getDetail());
                contentid = DataCenterControl.worlddt_listcontainer_list.get(i).getContent_id();
                userid = DataCenterControl.worlddt_listcontainer_list.get(i).getUser_id();
                MyTools.UpDataWorldListReadInfo(DtAndWzDetails.this,DataCenterControl.worlddt_listcontainer_list.get(i).getContent_id()
                                            ,DataCenterControl.worlddt_listcontainer_list.get(i).getUser_id()
                                            ,dt_wz_detail_authorbut
                                            ,dt_wz_detail_topddl_agreebut
                                            ,dt_wz_detail_topddl_collectbut);
                break;
            case "worldxmlc":
                //项目不用该页面展示
                break;
            case "worldwzlc":
                if(DataCenterControl.userName.equals(DataCenterControl.worldwz_listcontainer_list.get(i).getUser_id())){
                    dt_wz_detail_authorbut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_discussbut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_agreebut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_collectbut.setVisibility(Component.HIDE);
                }
                else {
                    dt_wz_detail_authorbut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_discussbut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_agreebut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_collectbut.setVisibility(Component.VISIBLE);
                }
                dt_wz_detail_authortext.setText(DataCenterControl.worldwz_listcontainer_list.get(i).getUser_id());
                dt_wz_detail_fieldtext.setText(DataCenterControl.worldwz_listcontainer_list.get(i).getField_id());
                dt_wz_detail_contenttext.setText(DataCenterControl.worldwz_listcontainer_list.get(i).getDetail());
                contentid = DataCenterControl.worldwz_listcontainer_list.get(i).getContent_id();
                userid = DataCenterControl.worldwz_listcontainer_list.get(i).getUser_id();
                MyTools.UpDataWorldListReadInfo(DtAndWzDetails.this,DataCenterControl.worldwz_listcontainer_list.get(i).getContent_id()
                                                ,DataCenterControl.worldwz_listcontainer_list.get(i).getUser_id()
                                                ,dt_wz_detail_authorbut
                                                ,dt_wz_detail_topddl_agreebut
                                                ,dt_wz_detail_topddl_collectbut);
                break;
            case "artlc":
                if(DataCenterControl.userName.equals(DataCenterControl.art_listcontainer_list.get(i).getUser_id())){
                    dt_wz_detail_authorbut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_discussbut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_agreebut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_collectbut.setVisibility(Component.HIDE);
                }
                else {
                    dt_wz_detail_authorbut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_discussbut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_agreebut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_collectbut.setVisibility(Component.VISIBLE);
                }
                dt_wz_detail_authortext.setText(DataCenterControl.art_listcontainer_list.get(i).getUser_id());
                dt_wz_detail_fieldtext.setText(DataCenterControl.art_listcontainer_list.get(i).getField_id());
                dt_wz_detail_contenttext.setText(DataCenterControl.art_listcontainer_list.get(i).getDetail());
                contentid = DataCenterControl.art_listcontainer_list.get(i).getContent_id();
                userid = DataCenterControl.art_listcontainer_list.get(i).getUser_id();
                MyTools.UpDataWorldListReadInfo(DtAndWzDetails.this,DataCenterControl.art_listcontainer_list.get(i).getContent_id()
                                            ,DataCenterControl.art_listcontainer_list.get(i).getUser_id()
                                            ,dt_wz_detail_authorbut
                                            ,dt_wz_detail_topddl_agreebut
                                            ,dt_wz_detail_topddl_collectbut);
                break;
            case "clothelc":
                if(DataCenterControl.userName.equals(DataCenterControl.clothe_listcontainer_list.get(i).getUser_id())){
                    dt_wz_detail_authorbut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_discussbut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_agreebut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_collectbut.setVisibility(Component.HIDE);
                }
                else {
                    dt_wz_detail_authorbut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_discussbut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_agreebut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_collectbut.setVisibility(Component.VISIBLE);
                }
                dt_wz_detail_authortext.setText(DataCenterControl.clothe_listcontainer_list.get(i).getUser_id());
                dt_wz_detail_fieldtext.setText(DataCenterControl.clothe_listcontainer_list.get(i).getField_id());
                dt_wz_detail_contenttext.setText(DataCenterControl.clothe_listcontainer_list.get(i).getDetail());
                contentid = DataCenterControl.clothe_listcontainer_list.get(i).getContent_id();
                userid = DataCenterControl.clothe_listcontainer_list.get(i).getUser_id();
                MyTools.UpDataWorldListReadInfo(DtAndWzDetails.this,DataCenterControl.clothe_listcontainer_list.get(i).getContent_id()
                                                ,DataCenterControl.clothe_listcontainer_list.get(i).getUser_id()
                                                ,dt_wz_detail_authorbut
                                                ,dt_wz_detail_topddl_agreebut
                                                ,dt_wz_detail_topddl_collectbut);
                break;
            case "foodlc":
                if(DataCenterControl.userName.equals(DataCenterControl.food_listcontainer_list.get(i).getUser_id())){
                    dt_wz_detail_authorbut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_discussbut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_agreebut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_collectbut.setVisibility(Component.HIDE);
                }
                else {
                    dt_wz_detail_authorbut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_discussbut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_agreebut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_collectbut.setVisibility(Component.VISIBLE);
                }
                dt_wz_detail_authortext.setText(DataCenterControl.food_listcontainer_list.get(i).getUser_id());
                dt_wz_detail_fieldtext.setText(DataCenterControl.food_listcontainer_list.get(i).getField_id());
                dt_wz_detail_contenttext.setText(DataCenterControl.food_listcontainer_list.get(i).getDetail());
                contentid = DataCenterControl.food_listcontainer_list.get(i).getContent_id();
                userid = DataCenterControl.food_listcontainer_list.get(i).getUser_id();
                MyTools.UpDataWorldListReadInfo(DtAndWzDetails.this,DataCenterControl.food_listcontainer_list.get(i).getContent_id()
                                                ,DataCenterControl.food_listcontainer_list.get(i).getUser_id()
                                                ,dt_wz_detail_authorbut
                                                ,dt_wz_detail_topddl_agreebut
                                                ,dt_wz_detail_topddl_collectbut);
                break;
            case "houselc":
                if(DataCenterControl.userName.equals(DataCenterControl.house_listcontainer_list.get(i).getUser_id())){
                    dt_wz_detail_authorbut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_discussbut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_agreebut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_collectbut.setVisibility(Component.HIDE);
                }
                else {
                    dt_wz_detail_authorbut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_discussbut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_agreebut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_collectbut.setVisibility(Component.VISIBLE);
                }
                dt_wz_detail_authortext.setText(DataCenterControl.house_listcontainer_list.get(i).getUser_id());
                dt_wz_detail_fieldtext.setText(DataCenterControl.house_listcontainer_list.get(i).getField_id());
                dt_wz_detail_contenttext.setText(DataCenterControl.house_listcontainer_list.get(i).getDetail());
                contentid = DataCenterControl.house_listcontainer_list.get(i).getContent_id();
                userid = DataCenterControl.house_listcontainer_list.get(i).getUser_id();
                MyTools.UpDataWorldListReadInfo(DtAndWzDetails.this,DataCenterControl.house_listcontainer_list.get(i).getContent_id()
                                                ,DataCenterControl.house_listcontainer_list.get(i).getUser_id()
                                                ,dt_wz_detail_authorbut
                                                ,dt_wz_detail_topddl_agreebut
                                                ,dt_wz_detail_topddl_collectbut);
                break;
            case "trafficlc":
                if(DataCenterControl.userName.equals(DataCenterControl.traffic_listcontainer_list.get(i).getUser_id())){
                    dt_wz_detail_authorbut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_discussbut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_agreebut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_collectbut.setVisibility(Component.HIDE);
                }
                else {
                    dt_wz_detail_authorbut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_discussbut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_agreebut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_collectbut.setVisibility(Component.VISIBLE);
                }
                dt_wz_detail_authortext.setText(DataCenterControl.traffic_listcontainer_list.get(i).getUser_id());
                dt_wz_detail_fieldtext.setText(DataCenterControl.traffic_listcontainer_list.get(i).getField_id());
                dt_wz_detail_contenttext.setText(DataCenterControl.traffic_listcontainer_list.get(i).getDetail());
                contentid = DataCenterControl.traffic_listcontainer_list.get(i).getContent_id();
                userid = DataCenterControl.traffic_listcontainer_list.get(i).getUser_id();
                MyTools.UpDataWorldListReadInfo(DtAndWzDetails.this,DataCenterControl.traffic_listcontainer_list.get(i).getContent_id()
                                                ,DataCenterControl.traffic_listcontainer_list.get(i).getUser_id()
                                                ,dt_wz_detail_authorbut
                                                ,dt_wz_detail_topddl_agreebut
                                                ,dt_wz_detail_topddl_collectbut);
                break;
            case "studylc":
                if(DataCenterControl.userName.equals(DataCenterControl.study_listcontainer_list.get(i).getUser_id())){
                    dt_wz_detail_authorbut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_discussbut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_agreebut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_collectbut.setVisibility(Component.HIDE);
                }
                else {
                    dt_wz_detail_authorbut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_discussbut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_agreebut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_collectbut.setVisibility(Component.VISIBLE);
                }
                dt_wz_detail_authortext.setText(DataCenterControl.study_listcontainer_list.get(i).getUser_id());
                dt_wz_detail_fieldtext.setText(DataCenterControl.study_listcontainer_list.get(i).getField_id());
                dt_wz_detail_contenttext.setText(DataCenterControl.study_listcontainer_list.get(i).getDetail());
                contentid = DataCenterControl.study_listcontainer_list.get(i).getContent_id();
                userid = DataCenterControl.study_listcontainer_list.get(i).getUser_id();
                MyTools.UpDataWorldListReadInfo(DtAndWzDetails.this,DataCenterControl.study_listcontainer_list.get(i).getContent_id()
                                                ,DataCenterControl.study_listcontainer_list.get(i).getUser_id()
                                                ,dt_wz_detail_authorbut
                                                ,dt_wz_detail_topddl_agreebut
                                                ,dt_wz_detail_topddl_collectbut);
                break;
            case "culturelc":
                if(DataCenterControl.userName.equals(DataCenterControl.culture_listcontainer_list.get(i).getUser_id())){
                    dt_wz_detail_authorbut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_discussbut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_agreebut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_collectbut.setVisibility(Component.HIDE);
                }
                else {
                    dt_wz_detail_authorbut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_discussbut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_agreebut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_collectbut.setVisibility(Component.VISIBLE);
                }
                dt_wz_detail_authortext.setText(DataCenterControl.culture_listcontainer_list.get(i).getUser_id());
                dt_wz_detail_fieldtext.setText(DataCenterControl.culture_listcontainer_list.get(i).getField_id());
                dt_wz_detail_contenttext.setText(DataCenterControl.culture_listcontainer_list.get(i).getDetail());
                contentid = DataCenterControl.culture_listcontainer_list.get(i).getContent_id();
                userid = DataCenterControl.culture_listcontainer_list.get(i).getUser_id();
                MyTools.UpDataWorldListReadInfo(DtAndWzDetails.this,DataCenterControl.culture_listcontainer_list.get(i).getContent_id()
                                                ,DataCenterControl.culture_listcontainer_list.get(i).getUser_id()
                                                ,dt_wz_detail_authorbut
                                                ,dt_wz_detail_topddl_agreebut
                                                ,dt_wz_detail_topddl_collectbut);
                break;
            case "userdtlc":
                if(DataCenterControl.userName.equals(DataCenterControl.userdt_listcontainer_list.get(i).getUser_id())){
                    dt_wz_detail_authorbut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_discussbut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_agreebut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_collectbut.setVisibility(Component.HIDE);
                }
                else {
                    dt_wz_detail_authorbut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_discussbut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_agreebut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_collectbut.setVisibility(Component.VISIBLE);
                }
                dt_wz_detail_authortext.setText(DataCenterControl.userdt_listcontainer_list.get(i).getUser_id());
                dt_wz_detail_fieldtext.setText(DataCenterControl.userdt_listcontainer_list.get(i).getField_id());
                dt_wz_detail_contenttext.setText(DataCenterControl.userdt_listcontainer_list.get(i).getDetail());
                contentid = DataCenterControl.userdt_listcontainer_list.get(i).getContent_id();
                userid = DataCenterControl.userdt_listcontainer_list.get(i).getUser_id();
                MyTools.UpDataWorldListReadInfo(DtAndWzDetails.this,DataCenterControl.userdt_listcontainer_list.get(i).getContent_id()
                                                ,DataCenterControl.userdt_listcontainer_list.get(i).getUser_id()
                                                ,dt_wz_detail_authorbut
                                                ,dt_wz_detail_topddl_agreebut
                                                ,dt_wz_detail_topddl_collectbut);
                break;
            case "userxmlc":
                break;
            case "userwzlc":
                if(DataCenterControl.userName.equals(DataCenterControl.userwz_listcontainer_list.get(i).getUser_id())){
                    dt_wz_detail_authorbut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_discussbut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_agreebut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_collectbut.setVisibility(Component.HIDE);
                }
                else {
                    dt_wz_detail_authorbut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_discussbut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_agreebut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_collectbut.setVisibility(Component.VISIBLE);
                }
                dt_wz_detail_authortext.setText(DataCenterControl.userwz_listcontainer_list.get(i).getUser_id());
                dt_wz_detail_fieldtext.setText(DataCenterControl.userwz_listcontainer_list.get(i).getField_id());
                dt_wz_detail_contenttext.setText(DataCenterControl.userwz_listcontainer_list.get(i).getDetail());
                contentid = DataCenterControl.userwz_listcontainer_list.get(i).getContent_id();
                userid = DataCenterControl.userwz_listcontainer_list.get(i).getUser_id();
                MyTools.UpDataWorldListReadInfo(DtAndWzDetails.this,DataCenterControl.userwz_listcontainer_list.get(i).getContent_id()
                                                ,DataCenterControl.userwz_listcontainer_list.get(i).getUser_id()
                                                ,dt_wz_detail_authorbut
                                                ,dt_wz_detail_topddl_agreebut
                                                ,dt_wz_detail_topddl_collectbut);
                break;
            case "usercollectlc":
                if(DataCenterControl.userName.equals(DataCenterControl.usercollect_listcontainer_list.get(i).getUser_id())){
                    dt_wz_detail_authorbut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_discussbut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_agreebut.setVisibility(Component.HIDE);
                    dt_wz_detail_topddl_collectbut.setVisibility(Component.HIDE);
                }
                else {
                    dt_wz_detail_authorbut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_discussbut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_agreebut.setVisibility(Component.VISIBLE);
                    dt_wz_detail_topddl_collectbut.setVisibility(Component.VISIBLE);
                }
                dt_wz_detail_authortext.setText(DataCenterControl.usercollect_listcontainer_list.get(i).getUser_id());
                dt_wz_detail_fieldtext.setText(DataCenterControl.usercollect_listcontainer_list.get(i).getField_id());
                dt_wz_detail_contenttext.setText(DataCenterControl.usercollect_listcontainer_list.get(i).getDetail());
                contentid = DataCenterControl.usercollect_listcontainer_list.get(i).getContent_id();
                userid = DataCenterControl.usercollect_listcontainer_list.get(i).getUser_id();
                MyTools.UpDataWorldListReadInfo(DtAndWzDetails.this,DataCenterControl.usercollect_listcontainer_list.get(i).getContent_id()
                                                ,DataCenterControl.usercollect_listcontainer_list.get(i).getUser_id()
                                                ,dt_wz_detail_authorbut
                                                ,dt_wz_detail_topddl_agreebut
                                                ,dt_wz_detail_topddl_collectbut);
                break;
            default:
                break;
        }


        dt_wz_detail_authorbut.setClickedListener(new Component.ClickedListener() {
            @Override
            public void onClick(Component component) {
                if(dt_wz_detail_authorbut.getText().equals("关注")){
                    MyTools.UpDataFollowInfo(DtAndWzDetails.this,dt_wz_detail_authorbut,userid,-2,"关注");
                }
                else if(dt_wz_detail_authorbut.getText().equals("已关注")){
                    MyTools.UpDataFollowInfo(DtAndWzDetails.this,dt_wz_detail_authorbut,userid,-2,"取消关注");
                }
            }
        });
        dt_wz_detail_topddl_nobut.setClickedListener(new Component.ClickedListener() {
            @Override
            public void onClick(Component component) {
                dt_wz_detail_authorbut.setText("加载中...");
                dt_wz_detail_topddl_agreebut.setText("加载中...");
                dt_wz_detail_topddl_collectbut.setText("加载中...");

                dt_wz_detail_authorbut.setVisibility(Component.VISIBLE);
                dt_wz_detail_topddl_discussbut.setVisibility(Component.VISIBLE);
                dt_wz_detail_topddl_agreebut.setVisibility(Component.VISIBLE);
                dt_wz_detail_topddl_collectbut.setVisibility(Component.VISIBLE);
                terminate();
            }
        });
        dt_wz_detail_topddl_discussbut.setClickedListener(new Component.ClickedListener() {
            @Override
            public void onClick(Component component) {
                present(new ContentDiscussSlice(),new Intent().setParam("contentid",contentid));
            }
        });
        dt_wz_detail_topddl_agreebut.setClickedListener(new Component.ClickedListener() {
            @Override
            public void onClick(Component component) {
                if(dt_wz_detail_topddl_agreebut.getText().equals("点赞")){
                    MyTools.UpDataAgreeAndCollectInfo(DtAndWzDetails.this,contentid,"点赞",dt_wz_detail_topddl_agreebut);
                    return;
                }
                if(dt_wz_detail_topddl_agreebut.getText().equals("已点赞")){
                    MyTools.UpDataAgreeAndCollectInfo(DtAndWzDetails.this,contentid,"取消点赞",dt_wz_detail_topddl_agreebut);
                    return;
                }
            }
        });
        dt_wz_detail_topddl_collectbut.setClickedListener(new Component.ClickedListener() {
            @Override
            public void onClick(Component component) {
                if(dt_wz_detail_topddl_collectbut.getText().equals("收藏")){
                    MyTools.UpDataAgreeAndCollectInfo(DtAndWzDetails.this,contentid,"收藏",dt_wz_detail_topddl_collectbut);
                    return;
                }
                if(dt_wz_detail_topddl_collectbut.getText().equals("已收藏")){
                    MyTools.UpDataAgreeAndCollectInfo(DtAndWzDetails.this,contentid,"取消收藏",dt_wz_detail_topddl_collectbut);
                    return;
                }
            }
        });
    }

    @Override
    protected void onStart(Intent intent) {
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_dt_wz_details);

        initDtWzDtASComponents(intent.getStringParam("listContainerName"),intent.getIntParam("i",-1));
    }

    @Override
    protected void onActive() {
        super.onActive();
    }

    @Override
    protected void onInactive() {
        super.onInactive();
    }

    @Override
    protected void onForeground(Intent intent) {
        super.onForeground(intent);
    }

    @Override
    protected void onBackground() {
        super.onBackground();
    }

    @Override
    protected void onStop() {
        super.onStop();
    }
}
